home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_torchdoor.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  84 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_torchlight.cog
  4. #
  5. # [SXC]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     activate
  14. message     startup
  15.  
  16. thing       torchobj0       linkid=2
  17. thing       torchobj1       linkid=2
  18. thing       door0
  19. thing       campos0
  20. thing       camera0                         local
  21. thing       player                          local
  22.  
  23. int         lit0=0                          local
  24. int         lit1=0                          local
  25. int         count=0                         local
  26. int         doorloop                        local
  27.  
  28.  
  29. end
  30.  
  31. # ========================================================================================
  32.  
  33. code
  34.  
  35. startup:
  36.     player = GetLocalPlayerThing();
  37.     return;
  38.  
  39. # ........................................................................................
  40. activate:
  41.     if ((GetSenderRef() == torchobj0) && (GetCurWeapon(player) == 13) && (lit0 == 0))
  42.     {
  43.         print("lit torch0");
  44.         lit0=1;
  45.         count=count + 1;
  46.     }
  47.     
  48.     if ((GetSenderRef() == torchobj1) && (GetCurWeapon(player) == 13) && (lit1 == 0))
  49.     {
  50.         print("lit torch1");
  51.         lit1=1;
  52.         count=count + 1;
  53.     }
  54.     
  55.     if (count == 2)
  56.     {
  57.         Sleep(1);
  58.         SetActorFlags(player, 0x200000);
  59.         StopThing(player);
  60.         StartCutscene(1);
  61.         SetCameraFocus(0, campos0);
  62.         SetCurrentCamera(0);
  63.         MoveToFrame(campos0, 1, 1);
  64.         MoveToFrame(door0, 1, 1);
  65.         WaitForStop(door0);
  66.         Sleep(1);
  67.         SetCurrentCamera(1);
  68.         ClearActorFlags(player, 0x200000);
  69.         EndCutscene(); 
  70.         
  71.     }
  72.     return;
  73.         
  74. # ........................................................................................
  75.         
  76. end
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.